from django.db import models

# Create your models here.

# class Books(models.Model):
#     id=models.AutoField(primary_key=True)
#     name=models.CharField(max_length=50)
#     price=models.CharField(max_length=20)

class Student(models.Model):
    name=models.CharField(max_length=10)
    sex=models.CharField(max_length=5)
    datetime=models.DateTimeField()
    phone=models.IntegerField()
    classes=models.ForeignKey(to='classess',on_delete=models.CASCADE)

class Teacher(models.Model):
    name=models.CharField(max_length=10)
    sex = models.CharField(max_length=5)
    datetime = models.DateTimeField()
    phone = models.IntegerField()
    work=models.ForeignKey(to='works',on_delete=models.CASCADE)

class works(models.Model):
    id=models.AutoField(primary_key=True)
    name=models.CharField(max_length=10)

class classess(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=10)
